package com.itheima.myscoket;

import java.io.IOException;
import java.net.*;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        //找码头
        DatagramSocket ds = new DatagramSocket();
        //发送
        DatagramPacket dp  = new DatagramPacket("给老丈人送酒".getBytes(),"给老丈人送酒".getBytes().length, InetAddress.getByName("192.168.19.48"),10002);
       //发送
        ds.send(dp);
        //走人
        ds.close();

    }
}
